Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/issue 354 restore optimization config for no bundle #477

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Feb 15, 2021

Related Issue

resolves #354

  • 30 points over current production 🎉

lighthouse-preview-preload-css-js

Current Next

Screen Shot 2021-03-27 at 3 49 30 PM

Current Production

Screen Shot 2021-03-27 at 3 48 05 PM

Note: this PR is dependent on features getting landed in #434

Summary of Changes

  1. (Re) introduced mode setting, now used for overall build context, e.g. mpa vs ssg vs spa (optimization will be mainly used to handle your <script> / <link> tag features, like inlining or preloading)
  2. Reenabling optimization configuration setting with the default being default
  3. Enabled 'mpa' mode option (fka. 'spa') for the website
    • implemented a custom router with page template awareness for proper page transitions
    • created a new resource plugin for generating all route related functionality when mode === 'mpa'
  4. fixed a bug with plugin-graphql not correctly inserting after <head> tag
  5. Enabled basic support for new optimization settings: none and inline

TODOs

  1. Finish 'mpa'
  2. Introduce a default optimization setting
  3. Add 'none' optimization option
  4. Add 'static'(fka. strict) optimization option (see thoughts section below)
  5. Add 'inline' optimization inline (see thoughts section below)
  6. Tests
  7. Documentation
  8. Should create an example without Google Analytics - drop google analytics plugin #496
  9. Should create an example of inline - [demo / bug] inline optimization is broken on subsequent page load #495
  10. Clean up code comments / logging

Thoughts / Next Steps tracking

  1. Considering having optimization marked as experimental for now, or at least inline. Will create a preview PR to show off since even locally was getting a 92 with it on!
  2. Additionally, should create an issue to track determining best optimization settings based on mode setting (at least by default). Not all scripts are created equally, preload vs prefetch. Router and GraphQL should probably use prefetch. - added to roadmap to 1.0 section in Roadmap To 1.0 And Beyond #418 for tracking
  3. Should make an issue to tracking adding per <link> / <script> overrides for inline and static optimization settings - - added to roadmap to 1.0 section in Roadmap To 1.0 And Beyond #418 for tracking
    • and then use that to optimize the site further (all inline vs selective uses of inline + static).
  4. Should make an issue to track adding per <link> / <script> overrides for preload or prefetch hints - - added to roadmap to 1.0 section in Roadmap To 1.0 And Beyond #418 for tracking
  5. For partial route filename hashing, might require a refactoring of how HTML optimization happens, since when doing it during serialization, you only assume that that one individual page has been built (since we are in a loop), and not the entire set, which means you can't use the graph to operate on the whole group to generate the same <routes for all pages. Saved a WIP branch here and will track as a follow up discussion. - added to roadmap to 1.0 section in Roadmap To 1.0 And Beyond #418 for tracking
  6. Make an issue to improve sizing for home page images (should probably do a test all pages) - fixed in Website/issue 268 update project vision #499

Screen Shot 2021-03-26 at 7 04 07 PM

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) P0 Critical issue that should get addressed ASAP CLI Router labels Feb 15, 2021
@thescientist13 thescientist13 linked an issue Feb 15, 2021 that may be closed by this pull request
5 tasks
@thescientist13 thescientist13 self-assigned this Feb 20, 2021
@thescientist13 thescientist13 added the website Tasks related to the projects website / documentation label Feb 20, 2021
@thescientist13 thescientist13 force-pushed the enhancement/issue-354-restore-optimization-for-no-bundle branch from 1be7c07 to aafb10f Compare March 23, 2021 01:33
@thescientist13 thescientist13 force-pushed the enhancement/issue-354-restore-optimization-for-no-bundle branch from e95afbd to 0621247 Compare March 26, 2021 16:36
@thescientist13 thescientist13 added the question Further information is requested label Mar 26, 2021
@thescientist13 thescientist13 added the documentation Greenwood specific docs label Mar 27, 2021
@thescientist13 thescientist13 marked this pull request as ready for review March 28, 2021 00:26
@thescientist13 thescientist13 removed the question Further information is requested label Apr 3, 2021
@thescientist13 thescientist13 merged commit 28aaa53 into release/0.10.0 Apr 3, 2021
@thescientist13 thescientist13 deleted the enhancement/issue-354-restore-optimization-for-no-bundle branch April 3, 2021 16:21
thescientist13 added a commit that referenced this pull request Apr 3, 2021
* client side router optimization setting for build

* filter only for anchor tags

* preserve URL on route change

* mode vs optimization configuration

* test cases for MPA

* clean up merge conflict marker

* clarify test it statements

* fix bug with graphql head tag closing

* default optimization for preloading CSS

* only preload CSS

* add none optimization option

* all anticipated optimization settings

* simplify minified output check

* added static optimization setting for JS templating

* introduce inline optimization setting

* inline optimization support enhancements

* fix styling for tables

* documentation for mode and optimization

* use modulepreload for ESM script tags
thescientist13 added a commit that referenced this pull request Apr 3, 2021
* client side router optimization setting for build

* filter only for anchor tags

* preserve URL on route change

* mode vs optimization configuration

* test cases for MPA

* clean up merge conflict marker

* clarify test it statements

* fix bug with graphql head tag closing

* default optimization for preloading CSS

* only preload CSS

* add none optimization option

* all anticipated optimization settings

* simplify minified output check

* added static optimization setting for JS templating

* introduce inline optimization setting

* inline optimization support enhancements

* fix styling for tables

* documentation for mode and optimization

* use modulepreload for ESM script tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking CLI documentation Greenwood specific docs enhancement Improve something existing (e.g. no docs, new APIs, etc) P0 Critical issue that should get addressed ASAP Router website Tasks related to the projects website / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Progressive Enhancement ("RedactJS")
1 participant